package com.appsindy.common.util;

import com.appsindy.common.util.encryption.AESBase64Crypto;
import com.appsindy.common.util.encryption.Crypto;

public class SecurityUtil {
    
    private static Crypto crypto = null;
    private SecurityUtil(){}
    
    public static String encrypt(String plainText){
        if(crypto == null){
            crypto = new AESBase64Crypto();
        }
        return crypto.encrypt(plainText);
    }
    
    public static String decrypt(String encryptedText){
        if(crypto == null){
            crypto = new AESBase64Crypto();
        }
        return crypto.decrypt(encryptedText);
    }
    
}
